package com.aspose.cells;

class zapq {
   String a;
   zapx b;
   private String h;
   private String i;
   Style c;
   boolean d;
   boolean e;
   boolean f;
   boolean g;
   private static final com.aspose.cells.b.c.a.za j = new com.aspose.cells.b.c.a.za(new String[]{"Normal"});

   zapq(Style var1, int var2) {
      Style var3 = null;
      boolean var4 = false;
      if (var1.getName() != null) {
         this.h = var1.getName();
         switch(j.a(this.h)) {
         case 0:
            this.h = "Default";
            var4 = true;
         }
      } else {
         this.h = "ce" + zaqh.a(var2);
         if (var1.h() >= 0 && var1.h() >= 0 && var1.h() < var1.e().B().getCount()) {
            var3 = var1.e().B().a(var1.h());
            switch(j.a(var3.getName())) {
            case 0:
               this.a("Default");
               break;
            default:
               this.a(var3.getName());
            }
         }
      }

      Style var5 = var1.e().D();
      if (var1.k()) {
         this.b = new zapx(var1.getFont());
      } else if (var3 != null && var1.q() != null) {
         Font var6 = var3.k() ? var3.getFont() : var1.e().G();
         if (var1.getFont().j() != 0 && !var1.getFont().a(var6, var1.e().n(), var1.e().n())) {
            this.b = new zapx(var1.getFont());
         }
      }

      this.c = var1;
      byte var11 = 0;
      String var7 = null;
      int[] var8 = new int[]{var11};
      String[] var9 = new String[]{var7};
      var1.a(var8, var9);
      int var12 = var8[0];
      var7 = var9[0];
      if (var1.j()) {
         this.a = "N" + var12;
      } else if (var3 != null && var12 != var3.getNumber()) {
         this.a = "N" + var12;
      }

      if (var4) {
         this.g = true;
         this.f = true;
         this.e = true;
         this.d = true;
      } else {
         this.g = this.c.l();
         Style var10;
         if (!this.g && var3 != null) {
            var10 = var3.l() ? var3 : var5;
            if (var1.getHorizontalAlignment() != var10.getHorizontalAlignment() || var1.getIndentLevel() != var10.getIndentLevel() || var1.getVerticalAlignment() != var10.getVerticalAlignment() || var1.isTextWrapped() != var10.isTextWrapped() || var1.getShrinkToFit() != var10.getShrinkToFit() || var1.getRotationAngle() != var10.getRotationAngle() || var1.getTextDirection() != var10.getTextDirection()) {
               this.g = true;
            }
         }

         this.f = this.c.m();
         if (!this.f && var3 != null && !var3.m() && var1.f()) {
            this.f = true;
         }

         this.e = this.c.o();
         if (!this.e && var3 != null) {
            var10 = var3.o() ? var3 : var5;
            if (var1.isLocked() != var10.isLocked() || var1.isFormulaHidden() != var10.isFormulaHidden()) {
               this.e = true;
            }
         }

         this.d = this.c.n();
         if (!this.d && var3 != null) {
            var10 = var3.n() ? var3 : var5;
            if (var1.getPattern() != var10.getPattern()) {
               this.d = true;
            }
         }
      }

   }

   String a() {
      return this.h;
   }

   String b() {
      return this.i;
   }

   void a(String var1) {
      this.i = var1;
   }
}
